<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>

    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">

    <!-- No Baidu Siteapp-->
    <meta http-equiv="Cache-Control" content="no-siteapp"/>

    <!-- Add to homescreen for Chrome on Android -->
    <meta name="mobile-web-app-capable" content="yes">

    <!-- Add to homescreen for Safari on iOS -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <meta name="msapplication-TileColor" content="#0e90d2">
    <link rel="stylesheet" href="__CDN__/assets/css/amazeui.min.css">
    <link rel="stylesheet" href="__CDN__/assets/css/app.css">
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }

        .beijing {
            background-image: url(__CDN__/images/beijing.png);
            background-size: 100% 100%;
        }

        .content {
            width: 86%;
            margin-left: 7%;
            margin-right: 7%;
            background-image: url(__CDN__/images/kuang.png);
            background-size: 100% 100%;
        }

        .title {
            border-bottom: 1px solid #C6A452;
            line-height: 54px;
        }

        .title > span {
            font-size: 24px;
        }

        .biaoti {
            font-size: 15px;
        }

        .data {
            font-size: 12px;
        }

        .chakan {
            font-size: 15px;
            border-bottom: 1px solid #333;
            line-height: 65px;
            color: #333;
        }

        .cont {
            height: 65px;
            display: table;
        }

        .content1 {
            height: 65px;
            border-bottom: 1px solid #C6A452;
        }

        .cot-box {
            display: table-cell;
            vertical-align: middle;
        }

        .cont-box {
            margin-bottom: 15px;
        }

        .sign-item {
            width: 100%;
            display: inline-block;
            background: url('__CDN__/images/sign_btn_bg.png') no-repeat;
            background-size:100% 100%;
            height: 30px;
            color: #000;
            /*font-family: '仿宋';*/
            line-height: 30px;
            font-size: 13px;
            text-align: center;
            margin-top: 15px;
        }
    </style>
</head>
<body>
<input type="hidden" id="note_pagenum_hidden" value="1">
<div class="am-g">
    <div class="am-u-sm-12 beijing am-padding-0" id="bj">
        <div class="am-u-sm-12 am-padding-0 content" id="cot">
            <div class="am-u-sm-12 am-padding-0 am-text-center title">
                <span>华严寺</span>
            </div>
            <div class="" style="text-align: left">
                <div class="am-u-sm-4">
                    <span class="sign-item">第一签第一</span>
                </div>
                <div class="am-u-sm-4">
                    <span class="sign-item">1111</span>
                </div>
                <div class="am-u-sm-4">
                    <span class="sign-item">1111</span>
                </div>
            </div>

        </div>
    </div>
</div>
<script src="__CDN__/assets/js/jquery.min.js"></script>
<script src="__CDN__/assets/js/amazeui.min.js"></script>
<script type="text/javascript">
    var obox = document.getElementById('bj');
    var ocot = document.getElementById('cot');
    var y = document.documentElement.clientHeight;
    obox.style.minHeight = y + 'px';
    ocot.style.minHeight = (0.88 * y) + 'px';
    ocot.style.marginTop = (0.05 * y) + 'px';
    ocot.style.marginBottom = (0.07 * y) + 'px';
    var page = 1; //当前页的页码
    var allpage = 1; //总页码，会从后台获取
    $(function () {
        getUserNoteListByPage(1);
    });

    function scrollFn() {
        allpage = $('#totalpage').val();
        //真实内容的高度
        var pageHeight = Math.max(document.body.scrollHeight, document.body.offsetHeight);
        //视窗的高度
        var viewportHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0;
        //隐藏的高度
        var scrollHeight = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
        if (pageHeight - viewportHeight - scrollHeight < 20) {  //如果满足触发条件，执行
            if (page <= allpage) {
                getUserNoteList();
            }
        }
    }
    $(window).bind("scroll", scrollFn);  //绑定滚动事件
    function getUserNoteListByPage(pagenum) {
        //提交form
        $('#note_pagenum_hidden').val(pagenum);
        getUserNoteList();
    }
    function getUserNoteList() {
        $.ajax({
            type: "POST",
            url: "__CDN__/index.php/index/index/user_note_list",
            async: false,
            data: {
                pagenum: page
            },
//            dataType: "json",
            success: function (data) {
//                console.info(data);
                page++;  //页数加1
                console.info('nextPage:' + page);
                $('#note_pagenum_hidden').val(page);
                $('#data_list').append(data);
                AMUI.gallery.init();
//                $("img .lazy").lazyload();
            },
            error: function (data) {
                console.info(data);
            }
        });
    }
</script>
</body>
</html>
